﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="quan_tri_quang_cao.ascx.cs" Inherits="Admin_Module_quan_tri_quang_cao" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<telerik:RadAjaxManager OnAjaxRequest="Ajax_Request" ID="RadAjaxManager1" runat="server" 
    DefaultLoadingPanelID="RadAjaxLoadingPanel1">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="grd" />
            </UpdatedControls>
        </telerik:AjaxSetting>
       
        <telerik:AjaxSetting AjaxControlID="grd">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="grd" />
                <telerik:AjaxUpdatedControl ControlID="lblMessage" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
</telerik:RadAjaxLoadingPanel>

<telerik:RadWindowManager OnClientClose="Window_Close" ID="RadWindowManager1" runat="server" >
    <Windows>
        <telerik:RadWindow VisibleStatusbar="false" Width="800px" Height="600px" runat="server" ID="windows1"></telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function Window_Close() {
            $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
        }
    </script>
</telerik:RadCodeBlock>

<asp:Label runat="server" ID="lblMessage"></asp:Label>

<fieldset style="width: 800px">
    <legend style="padding: 10px 20px 10px"><h3 style="color: #3333FF; font-size:large">QUẢN TRỊ QUẢNG CÁO</h3></legend>
   
    <table>
        <tr>
            <td style="width: 690px"></td>
            <td><a href="/Admin/Form/Adv_Add.aspx" ><img src="/Image/add2.png" alt="Thêm mới quảng cáo" />Thêm Mới</a></td>
        </tr>
    </table>
    
    
    <telerik:RadGrid runat="server" Skin="WebBlue" GridLines="Horizontal"  OnDeleteCommand="Adv_Delete" AutoGenerateColumns="false" ID="grd">
        <MasterTableView>
            <Columns>
                <telerik:GridBoundColumn HeaderText="ID" Display="false" DataField="AdvID"></telerik:GridBoundColumn>
                <telerik:GridTemplateColumn HeaderText="" DataField="">
                    <ItemTemplate>
                        <a href="/Admin/Form/Adv_Add.aspx?id=<%#DataBinder.Eval(Container.DataItem,"AdvID")%>">
                            <%# Eval("CompanyName")%>
                        </a>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridImageColumn ImageHeight="100" ImageWidth="150" HeaderText="Ảnh Quảng Cáo" DataImageUrlFields="AdvDescription"></telerik:GridImageColumn>
                <telerik:GridBoundColumn HeaderText="Source Link" DataField="AdvLink" Visible="false"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="Vị trí" DataField="Location" Visible="false"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="Kiểu Quảng Cáo" DataField="AdvType"></telerik:GridBoundColumn>
                <telerik:GridBoundColumn HeaderText="Thứ tự hiện thị" DataField="ViewOrder"></telerik:GridBoundColumn>
                <telerik:GridCheckBoxColumn HeaderText="Duyệt" DataField="IsApproved"></telerik:GridCheckBoxColumn>
                <telerik:GridButtonColumn CommandName="Delete" UniqueName="DeleteColumn" ButtonType="ImageButton" ConfirmText="Bạn có chắc chắn muốn xóa giải đấu?"  ImageUrl="/Image/delete.png"></telerik:GridButtonColumn>
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
</fieldset>